package org.q.threads;


public class MainThreadCatchException {
	
	public static void main(String[] args) throws InterruptedException{
		/*ExecutorService pool = Executors.newFixedThreadPool(5);
		for(int i=0;i<5;i++) {
			try {
				pool.submit(new SubThreadWithExecption()).get();
			} catch (Exception e) {
				System.out.println("----------"+e.getMessage());
			}
		}*/
		while(true) {
			new SubThreadWithExecption().process();
			System.out.println("线程开始休眠..." + Thread.currentThread().getName());
			Thread.sleep(2000);
		}
	}

}
